package com.itgaoshu.hospitalproject.mapper;

import com.itgaoshu.hospitalproject.bean.Departments;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

import java.util.List;
@Mapper
public interface DepartmentsMapper {
    //查询所有科室的方法
    List<Departments> departmentList(Departments departments);
    //添加科室的方法
    @Insert("insert into departments values(null,#{department})")
    int addDepartment(Departments departments);
    //查询该科室有没有
    @Select("select count(*) from departments where department=#{department}")
    int count(Departments departments);
}
